import { createBrowserRouter } from "react-router-dom";
import { lazy } from "react";
import App from "../App";

const Yin = lazy(() => import("../pages/yin/Index"));
const Yin1 = lazy(() => import("../pages/yin1/Index"));
const Home = lazy(() => import("../pages/home/Index"));
const Login = lazy(() => import("../pages/login/Index"));
const Reg = lazy(() => import("../pages/reg/Index"));
const Class = lazy(() => import("../pages/class/Index"));
const Video = lazy(() => import("../pages/video/Index"));
const Setxin = lazy(() => import("../pages/setxin/Index"));
const Wang = lazy(() => import("../pages/wang/Index"));
const Detail = lazy(() => import("../pages/detail/Index"));
const Keshilist = lazy(() => import("../pages/keshilist/Index"));
const Bingdetail = lazy(() => import("../pages/bingdetail/Index"));
const Yaodetail = lazy(() => import("../pages/yaodetail/Index"));
const Search = lazy(() => import("../pages/search/Index"));
const Person = lazy(() => import("../pages/person/Index"));
const Bingydetail = lazy(() => import("../pages/class/bingydetail/Index"));
const Wen = lazy(() => import("../pages/wen/Index"));
const Wendetail = lazy(() => import("../pages/wendetail/Index"));
const Pklist = lazy(() => import("../pages/wendetail/pklist/Index"));
const Bingye = lazy(() => import("../pages/bingye/Index"));
const Shoulist = lazy(() => import("../pages/shoulist/Index"));
const Bingxin = lazy(() => import("../pages/bingxin/Index"));
const Bingsearch = lazy(() => import("../pages/bingsearch/Index"));
const Qian = lazy(() => import("../pages/qian/Index"));
const Set = lazy(() => import("../pages/set/Index"));
const Myxinx = lazy(() => import("../pages/myxinx/Index"));
const Chong = lazy(() => import("../pages/chong/Index"));
const Ti = lazy(() => import("../pages/ti/Index"));
const Setname = lazy(() => import("../pages/setname/Index"));
const Bangyin = lazy(() => import("../pages/bangyin/Index"));
const Jiao = lazy(() => import("../pages/jiao/Index"));
const Quejiao = lazy(() => import("../pages/quejiao/Index"));
const Jiaoxiang = lazy(() => import("../pages/jiaoxiang/Index"));
const Home2 = lazy(() => import("../pages/home2/Index"));
const More = lazy(() => import("../pages/more/Index"));
const Wei = lazy(() => import("../pages/wei/Index"));
const Message = lazy(() => import("../pages/message/Index"));
const My = lazy(() => import("../pages/my/Index"));
const Yuyue = lazy(() => import("../pages/yuyue/Index"));
const Yuan = lazy(() => import("../pages/yuan/Index"));
const Ke = lazy(() => import("../pages/ke/Index"));
const Yi = lazy(() => import("../pages/yi/Index"));
const Shezhi = lazy(() => import("../pages/shezhi/Index"));
const Zhang = lazy(() => import("../pages/zhang/Index"));
const Jia = lazy(() => import("../pages/jia/Index"));
const Addjia = lazy(() => import("../pages/addjia/Index"));
const Zhendetail = lazy(() => import("../pages/zhendetail/Index"));
const Men = lazy(() => import("../pages/men/Index"));
const Menbao = lazy(() => import("../pages/menbao/Index"));
const Houzhen = lazy(() => import("../pages/houzhen/Index"));
const Guos = lazy(() => import("../pages/guos/Index"));
import Chat from "../pages/chat/Index";
const routes = createBrowserRouter([
  {
    path: "/",
    element: <App />,
    children: [
      { index: true, element: <Home /> },
      {
        path: "/home",
        element: <Home />,
      },

      {
        path: "/class",
        element: <Class />,
      },
      {
        path: "/video",
        element: <Video />,
      },
    ],
  },
  {
    path: "/yin",
    element: <Yin />,
  },

  {
    path: "/yin1",
    element: <Yin1 />,
  },

  {
    path: "/login",
    element: <Login />,
  },
  {
    path: "/reg",
    element: <Reg />,
  },
  {
    path: "/setxin",
    element: <Setxin />,
  },
  {
    path: "/wang",
    element: <Wang />,
  },
  {
    path: "/detail/:infoId",
    element: <Detail />,
  },
  {
    path: "/keshilist",
    element: <Keshilist />,
  },
  {
    path: "/bingdetail/:id",
    element: <Bingdetail />,
  },
  {
    path: "/yaodetail/:id",
    element: <Yaodetail />,
  },
  {
    path: "/search",
    element: <Search />,
  },
  {
    path: "/person",
    element: <Person />,
  },
  {
    path: "/bingydetail/:sickCircleId",
    element: <Bingydetail />,
  },
  {
    path: "/wen",
    element: <Wen />,
  },
  {
    path: "/wendetail/:doctorId",
    element: <Wendetail />,
  },
  {
    path: "/pklist/:doctorId",
    element: <Pklist />,
  },
  {
    path: "/bingye",
    element: <Bingye />,
  },
  {
    path: "/shoulist",
    element: <Shoulist />,
  },
  {
    path: "/chat",
    element: <Chat />,
  },
  {
    path: "/bingxin",
    element: <Bingxin />,
  },
  {
    path: "/bingsearch",
    element: <Bingsearch />,
  },
  {
    path: "/qian",
    element: <Qian />,
  },
  {
    path: "/set",
    element: <Set />,
  },
  {
    path: "/myxinx",
    element: <Myxinx />,
  },
  {
    path: "/chong",
    element: <Chong />,
  },
  {
    path: "/ti",
    element: <Ti />,
  },
  {
    path: "/setname",
    element: <Setname />,
  },
  {
    path: "/bangyin",
    element: <Bangyin />,
  },
  {
    path: "/jiao",
    element: <Jiao />,
  },
  {
    path: "/quejiao",
    element: <Quejiao />,
  },
  {
    path: "/jiaoxiang",
    element: <Jiaoxiang />,
  },

  {
    path: "/",
    element: <Guos />,
    children: [
      { index: true, element: <Home2 /> },
      {
        path: "/home2",
        element: <Home2 />,
      },
      {
        path: "/wei",
        element: <Wei />,
      },

      {
        path: "/message",
        element: <Message />,
      },
      {
        path: "/my",
        element: <My />,
      },
    ],
  },

  {
    path: "/more",
    element: <More />,
  },
  {
    path: "/yuyue",
    element: <Yuyue />,
  },
  {
    path: "/yuan",
    element: <Yuan />,
  },
  {
    path: "/ke",
    element: <Ke />,
  },
  {
    path: "/yi",
    element: <Yi />,
  },
  {
    path: "/shezhi",
    element: <Shezhi />,
  },
  {
    path: "/zhang",
    element: <Zhang />,
  },
  {
    path: "/jia",
    element: <Jia />,
  },
  {
    path: "/addjia",
    element: <Addjia />,
  },
  {
    path: "/zhendetail",
    element: <Zhendetail />,
  },
  {
    path: "/men",
    element: <Men />,
  },
  {
    path: "/menbao",
    element: <Menbao />,
  },
  {
    path: "/houzhen",
    element: <Houzhen />,
  },
]);
export default routes;
